/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queryOpt;

import java.io.*;

/**
 *
 * @author xz2215
 */
public class config {

    static private double r;
    static private double l;
    static private double t;
    static private double m;
    static private double f;
    static private double a;

    public static void SetParameter(String s2) {
        try {
            FileReader fr = new FileReader(s2);
            BufferedReader br = new BufferedReader(fr);
            String s = br.readLine();
            char select;
            String number;
            while (s != null) {
                number = s.substring(4);
                select = s.charAt(0);
                switch (select) {
                    case ('r'):
                        r = Double.valueOf(number);
                        break;
                    case ('t'):
                        t = Double.valueOf(number);
                        break;
                    case ('l'):
                        l = Double.valueOf(number);
                        break;
                    case ('m'):
                        m = Double.valueOf(number);
                        break;
                    case ('a'):
                        a = Double.valueOf(number);
                        break;
                    case ('f'):
                        f = Double.valueOf(number);
                        break;
                    default:

                }
                s = br.readLine();
            }

        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }

    public static double Get_r() {
        return r;
    }

    public static double Get_t() {
        return t;
    }

    public static double Get_l() {
        return l;
    }

    public static double Get_m() {
        return m;
    }

    public static double Get_a() {
        return a;
    }

    public static double Get_f() {
        return f;
    }
}
